package com.andy.db;

import android.os.Parcel;
import android.os.Parcelable;

public class CoinInfo implements Parcelable
{
    public static final String TABLE_NAME = "coin_info"; // 表名
    // 删除表语句
    public static final String DROP_TABLE_Height = "drop table if exists coin_info";
    // 创建一个保存里程的表
    public static final String CREATE_TABLE_Height = "create table if not exists coin_info(id INTEGER PRIMARY KEY "
            + "AUTOINCREMENT,position integer,coin_name varchar,"
            + "addr varchar, price varchar,market_value varchar,people_number varchar,trade_volume varchar,trade_number varchar,save_time varchar);";
    public static final String ID = "id";
    public static final String Position = "position";
    public static final String Coin_name = "coin_name";
    public static final String Addr = "addr";
    public static final String Price = "price";
    public static final String Market_value = "market_value";
    public static final String People_number = "people_number";
    public static final String Trade_volume = "trade_volume";
    public static final String Trade_number = "trade_number";
    public static final String Save_time = "save_time";



    public int position;
    public int id;
    public String coin_name;
    public String addr;
    public String price;
    public String market_value;
    public String people_number;
    public String trade_volume;
    public String trade_number;
    public String save_time;


    public static final Creator<CoinInfo> CREATOR = new Creator<CoinInfo>() {
        @Override
        public CoinInfo createFromParcel(Parcel in) {
            CoinInfo item = new CoinInfo();
            item.setPosition(in.readInt());
            item.setId(in.readInt());
            item.setCoin_name(in.readString());
            item.setAddr(in.readString());
            item.setPrice(in.readString());
            item.setMarket_value(in.readString());
            item.setPeople_number(in.readString());
            item.setTrade_number(in.readString());
            item.setTrade_volume(in.readString());
            item.setSave_time(in.readString());
            return item;
        }

        @Override
        public CoinInfo[] newArray(int size) {
            return new CoinInfo[size];
        }
    };
    @Override
    public int describeContents()
    {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i)
    {
        parcel.writeInt(position);
        parcel.writeInt(id);
        parcel.writeString(coin_name);
        parcel.writeString(addr);
        parcel.writeString(price);
        parcel.writeString(market_value);
        parcel.writeString(people_number);
        parcel.writeString(trade_volume);
        parcel.writeString(trade_number);
        parcel.writeString(save_time);

    }




    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCoin_name() {
        return coin_name;
    }

    public void setCoin_name(String coin_name) {
        this.coin_name = coin_name;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getMarket_value() {
        return market_value;
    }

    public void setMarket_value(String market_value) {
        this.market_value = market_value;
    }

    public String getPeople_number() {
        return people_number;
    }

    public void setPeople_number(String people_number) {
        this.people_number = people_number;
    }

    public String getTrade_volume() {
        return trade_volume;
    }

    public void setTrade_volume(String trade_volume) {
        this.trade_volume = trade_volume;
    }

    public String getTrade_number() {
        return trade_number;
    }

    public void setTrade_number(String trade_number) {
        this.trade_number = trade_number;
    }

    public String getSave_time() {
        return save_time;
    }

    public void setSave_time(String save_time) {
        this.save_time = save_time;
    }


}
